<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><?php echo $title; ?></title>
</head>
<body>
<table style="font-family: Arial,Verdana; width: 600px;">
	<tr>
		<td><p style="line-height: 1.5em; margin: 0 0 0.7em"><?php echo $text_greeting1; ?></p></td>
	</tr>
    <tr>
		<td>
            <div style="float: left; font-size: 13px; width: 49%;">
                <p style="font-weight: 600; margin-bottom: 3px; line-height: 1.5em;"><?php echo $to; ?></p>
                <p style="font-weight: 600; margin-bottom: 3px; line-height: 1.5em;"><?php echo $email; ?></p>                
            </div>
            <div style="float: right; font-size: 13px; width: 49%;">               
                <p style="font-weight: 600; margin-bottom: 3px; line-height: 1.5em;">Beløb: <?php echo $amount; ?></p>
                <p style="font-weight: 600; margin-bottom: 3px; line-height: 1.5em;">Ordrenummer: <?php echo $order_id; ?></p>
                <p style="font-weight: 600; margin-bottom: 3px; line-height: 1.5em;">Gavekort´s kode: <?php echo $giftcard_code; ?></p>
            </div>
        </td>
	</tr>
	<tr>
		<td>
			<table style="width: 100%; font-family: Verdana,sans-serif; font-size: 12px; color: #000000;">
                <tr style="background-color: #CCCCCC;">
                    <th align="left" style="width: 8%; padding: 0.3em; color: #FFFFFF;">Ordre-id</th>
                    <th align="left" style="width: 40%; padding: 0.3em; color: #FFFFFF;">Navn</th>                         
                    <th align="left" style="width: 18%; padding: 0.3em; color: #FFFFFF;">Dato</th>
                    <th align="left" style="width: 14%; padding: 0.3em; color: #FFFFFF;">Total</th>                                               
                </tr>
                <?php foreach ($histories as $history) { ?>
                    <tr style="background-color: #EEEEEE; text-align: center;">
                        <td align="right"><?php echo $history['order_id']; ?></td>
                        <td align="left" style="padding-left:5px;"><?php echo $history['customer'] ?></td>                                                                  
                        <td align="left" style="padding-left:5px;"><?php echo $history['date_added']; ?></td>
                        <td align="left" style="padding-left:5px;"><?php echo $history['amount']; ?></td>                                                         
                    </tr>
                <?php } ?>
                <tr style="text-align: right;">
                    <td colspan="2">&nbsp;</td>
                    <td style="background-color: #FFF; font-weight: bold; padding: 0.3em; text-align:right; padding-right:10px;">Total</td>
                    <td style="background-color: #FFF; padding: 0.3em; text-align:left; padding-left:5px;"><?php echo $balanced; ?></td>
                </tr>
            </table>
		</td>
	</tr>
</table>		
</body>
</html>
